aboutsummaryrefslogtreecommitdiff
path: root/pages/api/v2/etc/recent/[page].js
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api/v2/etc/recent/[page].js')
-rw-r--r--pages/api/v2/etc/recent/[page].js4
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/api/v2/etc/recent/[page].js b/pages/api/v2/etc/recent/[page].js
index b1bda0f..e21c38e 100644
--- a/pages/api/v2/etc/recent/[page].js
+++ b/pages/api/v2/etc/recent/[page].js
@@ -1,8 +1,8 @@
import { rateLimiterRedis, redis } from "@/lib/redis";
let API_URL;
-API_URL = process.env.API_URI;
-if (API_URL.endsWith("/")) {
+API_URL = process.env.API_URI || null;
+if (API_URL && API_URL.endsWith("/")) {
API_URL = API_URL.slice(0, -1);
}